﻿//NanoOrb.as
//TODO: Write Class Info here!
package {
	import flash.display.MovieClip;
	import flash.events.*;
	public class NanoOrb extends MovieClip implements Orb {

		// Constants:
		// Public Properties:
		// Private Properties:
		//**Grid Location
		private var gridX:Number;
		private var gridY:Number;
		//**Nano Type (grim, dex, buttercup, etc.)
		private var type:Number;
		//**attached to a NanoGroup
		private var attached:Boolean;
		//location of Nanogroup Partner
		private var partnerLocal:String;
		//**Alive if the orb is still in play
		private var alive:Boolean;

		// Initialization:
		public function NanoOrb(tempGridX:Number, tempGridY:Number, tempType:int):void {
			gridX = tempGridX;
			gridY = tempGridY;
			x = (gridX * Grid.unitX) + Grid.offsetX;
			y = (gridY * Grid.unitY) + Grid.offsetY;
			width = Grid.unitX;
			height = Grid.unitY;
			type = tempType;
			gotoAndStop(tempType);
			attached = true;
			alive = true;
			partnerLocal = "up";
		}
		// Public Methods:
		
		//Getters and Setters------------------------
		public function getX():Number {
			return x;
		}
		public function setX(temp:Number):void {
			x = temp;
		}
		
		public function getY():Number {
			return y;
		}
		public function setY(temp:Number):void {
			y = temp;
		}
		
		public function getGridX():Number {
			return gridX;
		}
		public function setGridX(temp:Number):void {
			gridX = temp;
			x = (gridX * Grid.unitX) + Grid.offsetX;
		}
		
		public function getGridY():Number {
			return gridY;
		}
		public function setGridY(temp:Number):void {
			gridY = temp;
			y = (gridY * Grid.unitY) + Grid.offsetY;
		}
		
		public function getType():Number {
			return type;
		}
		public function setType(temp:Number):void {
			type = temp;
		}
		
		public function getAttached():Boolean {
			return attached;
		}
		public function setAttached(temp:Boolean):void {
			attached = temp;
		}
		
		public function getAlive():Boolean {
			return alive;
		}
		public function setAlive(temp:Boolean):void {
			alive = temp;
		}
		
		public function getPartnerLocal():String {
			return partnerLocal;
		}
		public function setPartnerLocal(temp:String):void {
			partnerLocal = temp;
		}
		//END Getters and Setters------------------------
		
		// Protected Methods:
	}

}